import request from '@/utils/request';
export async function Create(params: any, control: string) {
    return request('/api/services/app/' + control + '/Create', {
        method: 'POST',
        data: params,
    });
}
export async function Update(params: any, control: string) {
    return request('/api/services/app/' + control + '/Update', {
        method: 'PUT',
        data: params,
    });
}
export async function Delete(params: any, control: string) {
    return request('/api/services/app/' + control + '/Delete', {
        method: 'DELETE',
        params,
    });
}
export async function Get(params: any, control: string) {
    return request('/api/services/app/' + control + '/Get', {
        method: 'GET',
        params,
    });
}
export async function GetAll(params: any, control: string) {
    return request('/api/services/app/' + control + '/GetAll', {
        method: 'GET',
        params,
    });
}
export async function GetTreeList(params: any, control: string) {
    return request('/api/services/app/' + control + '/GetTreeListAsync', {
        method: 'GET',
        params,
    });
}

export async function GetAllPermissions() {
    return request('/api/services/app/Role/GetAllPermissions', {
        method: 'GET',
    });
}

export async function ChangePassword(params: any) {
    return request('/api/services/app/User/ChangePassword', {
        method: 'POST',
        data: params,
    });
}

export async function GetListByCustAsync(params: any) {
    return request('/api/services/app/UserPayChanel/GetListByCustAsync', {
        method: 'GET',
        params,
    });
}

export async function EnablePayChanelAsync(params: any) {
    return request('/api/services/app/UserPayChanel/EnablePayChanelAsync', {
        method: 'POST',
        params,
    });
}
export async function GetOptsAsync(params: any) {
    return request('/api/services/app/UserPayChanel/GetOptsAsync', {
        method: 'GET',
        params,
    });
}

export async function GetTreeData(params: any) {
    return request('/api/services/app/Category/GetTreeDataAsync', {
        method: 'GET',
        params,
    });
}
export async function GetAllByPart(params: any, control: string) {
    return request('/api/services/app/' + control + '/GetAllByPart', {
        method: 'GET',
        params,
    });
}
export async function GetList(params: any, control: string) {
    return request('/api/services/app/' + control + '/GetList', {
        method: 'GET',
        params,
    });
}
export async function GetEduConfig(params: any, control: string) {
    return request('/api/services/app/Edu_Config/GetEduConfig', {
        method: 'GET',
        params,
    });
}
export async function GetVTrade(params: any) {
    return request('/api/services/app/Edu_Trade/GetVTrade', {
        method: 'GET',
        params,
    });
}
export async function GetPieData(params: any, control: string) {
    return request('/api/services/app/' + control + '/GetPieData', {
        method: 'GET',
        params,
    });
}

export async function ImgCache() {
    return request('/api/services/app/Attachment/ImgCache', {
        method: 'POST'
    });
}

export async function Apprv(params: any, control: string) {
    return request('/api/services/app/' + control + '/Apprv', {
        method: 'POST',
        data: params,
    });
}

export async function GetFileExt() {
    return request('/api/services/app/AttachIndex/GetFileExtAsync', {
        method: 'GET'
    });
}
export async function CopyQD(params: any, control: string) {
    return request('/api/services/app/' + control + '/CopyById', {
        method: 'POST',
        data: params,
    });
}
export async function BatchAll(params: any, control: string) {
    return request('/api/services/app/' + control + '/BatchAll', {
        method: 'POST',
        data: params,
    });
}
export async function UpdatePassword(params: any, control: string) {
    return request('/api/services/app/' + control + '/UpdatePassword', {
        method: 'PUT',
        params,
    });
}
export async function ActDeny(params: any, control: string) {
    return request('/api/services/app/' + control + '/Deny', {
        method: 'POST',
        params,
    });
}
export async function ActFrozen(params: any, control: string) {
    return request('/api/services/app/' + control + '/Frozen', {
        method: 'POST',
        params,
    });
}
export async function UpdateIsTop(params: any, ) {
    return request('/api/services/app/Edu_CourseCommentService/UpdateIsTop', {
        method: 'PUT',
        params,
    });
}
export async function CreateCourse(params: any, ) {
    return request('/api/services/app/Edu_ProductCourse/CreateCourse', {
        method: 'POST',
        data:params,
    });
}
export async function GetById(params: any, ) {
    return request('/api/services/app/Edu_ProductCourse/GetById', {
        method: 'GET',
        params,
    });
}
export async function SortNumMove(params: any, ) {
    return request('/api/services/app/Edu_ProductCourse/SortNumMove', {
        method: 'POST',
        params,
    });
}
export async function CreateExpand(params: any, ) {
    return request('/api/services/app/Edu_CourseExpand/CreateExpand', {
        method: 'POST',
        data:params,
    });
}
export async function CopyCourse(params: any, ) {
    return request('/api/services/app/Edu_Course/CopyCourse', {
        method: 'POST',
        params,
    });
}
export async function BatchShelf(params: any, ) {
    return request('/api/services/app/Edu_Product/BatchIsShelf', {
        method: 'POST',
        params,
    });
}
export async function GetRelation(params: any, ) {
    return request('/api/services/app/Edu_Product/GetRelation', {
        method: 'GET',
        params,
    });
}
export async function DeleteRelation(params: any, ) {
    return request('/api/services/app/Edu_Product/DeleteRelation', {
        method: 'DELETE',
        params,
    });
}
export async function UpdateCoupon(params: any, ) {
    return request('/api/services/app/Edu_Product/BatchUpdateCoupon', {
        method: 'POST',
        params,
    });
}
export async function GetByCouponId(params: any, ) {
    return request('/api/services/app/Edu_Product/GetByCouponId', {
        method: 'GET',
        params,
    });
}
export async function BatchCreate(params: any, ) {
    return request('/api/services/app/Edu_MyCoupon/BatchCreate', {
        method: 'POST',
        params,
    });
}
export async function BatchDelete(params: any, ) {
    return request('/api/services/app/Edu_Product/BatchDelete', {
        method: 'POST',
        params,
    });
}
export async function UpdateStatus(params: any, ) {
    return request('/api/services/app/Edu_CashOutAmtHistory/UpdateStatus', {
        method: 'PUT',
        params,
    });
}
export async function GetListNew(params: any, ) {
    return request('/api/services/app/Edu_Vaccines/GetListNew', {
        method: 'GET',
        params,
    });
}
export async function UpdateConfig(params: any, ) {
    return request('/api/services/app/Edu_Config/UpdateConfig', {
        method: 'PUT',
        params,
    });
}
//查询优惠券兑换码
export async function GetExchangeCodeList(params: any, ) {
    return request('/api/services/app/Edu_CouponExchange/GetExchangeCodeList', {
        method: 'GET',
        params,
    });
}
//批量生成兑换码
export async function GetBatchExchangeCode(params: any, ) {
    return request('/api/services/app/Edu_CouponExchange/GetBatchExchangeCode', {
        method: 'GET',
        params,
    });
}
//批量导出兑换码
export async function ExportExcel(params: any, ) {
    return request('/ExcelHelper/ExportExcel', {
        method: 'GET',
        data:params,
    });
}